﻿@{
    Layout = null;

    var f = (Forum)ViewBag.Forum;
}
@model List<Topic>
@if (Model != null && Model.Count > 0)
{
    <rss version="2.0">
    <channel>

    <title>@string.Format("{0}", f != null ? f.ForumName : ForumContext.Configuration.ForumName)</title>
    <link>@Request.Url</link>
    <description>@string.Format("{0}", f != null?f.Description:ForumContext.Configuration.Description)</description>
    
    @foreach (Topic t in Model)
    {

        var _desc = Html.Encode(t.Message.HtmlClean());
        
         <item>
            
            <title>@t.TopicName</title>
            <link>@ForumContext.GetAbsoluteUrl(ForumUrls.FIND_POST, t.TopicId)</link>
            <author>@t.UserName</author>
            <pubDate>@String.Format("{0:R}", t.Created)</pubDate>
            <description>@_desc</description>
        </item>
    }


     </channel>
 </rss>
}
